<?php
/*
 * Created on 18.03.2008
 *
 * filename: error.php5
 */
  class Controller_Error extends Controller_Base {
 	function index($args) {
		sanitize_vars(
			$_GET,
			array(
				'required'	=> array('type' => 'string','function'=>array('addslashes')),
				'exists'	=> array('type' => 'string','function'=>array('nl2br')),
				'denied'	=> array('type' => 'boolean'),
			),
			null
		);
		
		$template = new Template('admin/index.tmpl');
		
		$admin = new Model_Admin_User();
		$admin->is_logged();
		
		$tabs = new Model_Tabs();
		
		$template->setArgs(
			array(
				'required' 	=> $_GET['required'],
				'exists'	=> $_GET['exists'],
				'denied'	=> 1,
				'back_uri'	=> $_SERVER['HTTP_REFERER'],
				'tabs'		=> $tabs->get('error'),
				'_user'		=> $admin,
			)
		);		
		
		return $template;

 	}
  }
  
?>
